package co.za.itweb.itwebpro;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ViewFlipper;
import co.za.itweb.itwebpro.SimpleGestureFilter.SimpleGestureListener;


public class Help extends Activity implements SimpleGestureListener {

	/** Called when the activity is first created. */
	private SimpleGestureFilter detector;
	ViewFlipper flipper;

	Button close;
	int y;

	

	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_help);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		close=(Button) findViewById(R.id.closemap);
		close.setOnClickListener(new OnClickListener(){
			

			@Override
			public void onClick(View v) {
				if(close.getText().equals("Next screen")){
					flipper.setDisplayedChild(1);
					close.setText("Close");
				}else{
					if(close.getText().equals("Close")){
						finish();
					}
				}
				
				
			}
		});
		flipper = (ViewFlipper) findViewById(R.id.main_flipper);
		detector = new SimpleGestureFilter(this, this);
		
		

	}
	
	@Override
	public boolean dispatchTouchEvent(MotionEvent me) {
		this.detector.onTouchEvent(me);
		return super.dispatchTouchEvent(me);
	}

	

	@Override
	public void onSwipe(int direction) {
		
		
	}

	@Override
	public void onDoubleTap() {
		// TODO Auto-generated method stub
		
	}
	
	

}
